#include "types.h"
#include "stat.h"
#include "user.h"

int PATH_IND = 0;
char* PATH[10];

int main(int argc, char *argv[])
{
  int i;
  int k;
  char* p;
  int j;
  char* buffer[32];
  //printf(2, "argv length = %d\n", strlen(argv[1]) );
  if (argc == 1)
    exit();
  
  k = 0;
  
  while(argv[1][k] != '\x00')
  {
      j = 0;
      while (argv[1][k] != ':')
      {
	buffer[j] = argv[1][k];
	k++;
	j++;    
      }
      
      PATH[PATH_IND] = malloc(j+1);
      for (i = 0; i < j; i++)
	PATH[PATH_IND][i] = buffer[i];
      PATH[PATH_IND][j] = '\x00'; 				// null terminating
      PATH_IND += 1;
      k++;
  }
  
  //printf(2, "PATH_IND: %d\n", PATH_IND);
  printf(2, "path[0]: %s\n", PATH[0]);
  printf(2, "path[1]: %s\n", PATH[1]);
  
  exit();
}
